from selenium import webdriver
import time

driver=webdriver.Chrome()
driver.get("https://www.baidu.com/")
# driver.find_element_by_id("kw").send_keys("东京奥运会")
# driver.find_element_by_id("su").click()
# driver.find_element_by_name("wd").send_keys("东京奥运会")
# driver.find_element_by_id("su").click()
# driver.find_element_by_link_text("视频").click()
# driver.find_element_by_partial_link_text("频").click()
# driver.find_element_by_xpath("//*[@id='kw']").send_keys("王德发")
# driver.find_element_by_xpath("//*[@id='su']").click()
driver.find_element_by_css_selector("#kw").send_keys("王德发")
driver.find_element_by_css_selector("#su").click()
time.sleep(8)
driver.quit()